<%= form_tag(filter_transactions_path(:type =>@transaction_type), :id =>"transactionFilterSortFormId", :method=>:post, :remote => true) do -%>
    <span class="tooltip">
        <span><%=t('tooltip.record.add')%></span>
        <%= link_to t('add.item'), new_transaction_path(:type => @transaction_type), :id => "addNewTransactionButtonID", :class => "link link-inline" %>
    </span>
    <span class="tooltip">
        <span><%=t('tooltip.filter')%></span>
        <%= link_to_function t('button.filter'), "transactionsJS.toggleFilter()", :id => "filterButtonId", :class => "link link-inline" %>
    </span>
    <div id="transactionSortFormId">
      <%=hidden_field_tag 'type', @transaction_type%>
      <%=hidden_field_tag 'page', @page, :id => "pageID"%>
      <%= label_tag "field", t('sorting_by'), :class => "statistic-date-label", :style => "font-weight: bold;"%>
      <%= select_tag "field", getTransactionsSortingOptionList(@transaction_type).html_safe , :id => "field"%>
      <%= select_tag "direction", getSortingDirectionOptionList.html_safe , :id => "direction"%>
    </div>
    <div id="transactionFilterFormId">
      <div>
        <%= label_tag "date_from", t('button.filter')+":", :class => "statistic-date-label", :style => "font-weight: bold;"%>
        <%= label_tag "date_from", t('field.common.date_from'), :class => "statistic-date-label-left"%>
        <%= text_field_tag "date_from", @date_from, :id=>"date_from", :readonly => true, :class => "statistic-date-field"%>
        <%= label_tag "date_to", t('field.common.date_to'), :class => "statistic-date-label"%>
        <%= text_field_tag "date_to", @date_to, :id=>"date_to", :readonly => true, :class => "statistic-date-field"%>
        <%= label_tag "category", t('field.transaction.category'), :class => "statistic-date-label"%>
        <%if @transaction_type == Transaction::TRANSACTION_FROM_ACCOUNT_TO_CATEGORY ||
              @transaction_type == Transaction::TRANSACTION_FROM_CASH_TO_CATEGORY%>
            <%= select_tag "category",  options_from_collection_for_select(@categories, "id", "name", @category_id), :include_blank => true, :id => "category"%>
        <%else%>
            <%= select_tag "category",  options_from_collection_for_select(@categories, "id", "name", @category_id), :include_blank => true, :id => "category", :disabled => true%>
        <%end%>
      </div>
    </div>
<% end -%>